<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    300. Longest Increasing Subsequence
   </h1>
   <p>
    Given an unsorted array of integers, find the length of longest increasing subsequence.
   </p>
   <p>
    <b>
     Example:
    </b>
   </p>
   <pre>
<b>Input:</b> <code>[10,9,2,5,3,7,101,18]
</code><b>Output: </b>4 
<strong>Explanation: </strong>The longest increasing subsequence is <code>[2,3,7,101]</code>, therefore the length is <code>4</code>. </pre>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <ul>
    <li>
     There may be more than one LIS combination, it is only necessary for you to return the length.
    </li>
    <li>
     Your algorithm should run in O(
     <i>
      n
      <sup>
       2
      </sup>
     </i>
     ) complexity.
    </li>
   </ul>
   <p>
    <b>
     Follow up:
    </b>
    Could you improve it to O(
    <i>
     n
    </i>
    log
    <i>
     n
    </i>
    ) time complexity?
   </p>
  </div>
  <div>
   <h1 class="question_title">
    300. 最长上升子序列
   </h1>
   <p>
    给定一个无序的整数数组，找到其中最长上升子序列的长度。
   </p>
   <p>
    <strong>
     示例:
    </strong>
   </p>
   <pre><strong>输入:</strong> <code>[10,9,2,5,3,7,101,18]
</code><strong>输出: </strong>4 
<strong>解释: </strong>最长的上升子序列是&nbsp;<code>[2,3,7,101]，</code>它的长度是 <code>4</code>。</pre>
   <p>
    <strong>
     说明:
    </strong>
   </p>
   <ul>
    <li>
     可能会有多种最长上升子序列的组合，你只需要输出对应的长度即可。
    </li>
    <li>
     你算法的时间复杂度应该为&nbsp;O(
     <em>
      n
      <sup>
       2
      </sup>
     </em>
     ) 。
    </li>
   </ul>
   <p>
    <strong>
     进阶:
    </strong>
    你能将算法的时间复杂度降低到&nbsp;O(
    <em>
     n
    </em>
    log
    <em>
     n
    </em>
    ) 吗?
   </p>
  </div>
 </body>
</html>